/*
 * num_functions.c
 *
 *  Created on: Jul 30, 2009
 *      Author: z1083248
 */
#include "num_functions.h"

/*
 * Determines if the BUFF_SIZE is a power of two.
 *
 * NOTE: This only works for unsigned integer types, which is what we expect
 *       the type to always be.
 */
extern inline bool IsPowerOfTwo(BUFF_SIZE num)
{
   return (num && !(num & (num - 1)));
}
